package com.luyuan.crm.sale.model;

public enum ExpressCompany {
	EMS(1, "EMS"), SF_EXPRESS(2, "顺丰（路运）"), SF_EXPRESS_AIR(3, "顺丰（空运）"), STO_EXPRESS(
			4, "申通"), YTO_EXPRESS(5, "圆通"), YUNDAEX_EXPRESS(6, "韵达"), ZJS_EXPRESS(
			7, "宅急送"), CITY_EXPRESS(8, "市内送货"), OTHERS(9, "其他");
	private int index;
	private String eName;

	private ExpressCompany(int index, String eName) {
		this.index = index;
		this.eName = eName;
	}

	public static ExpressCompany valueOF(int index) {
		ExpressCompany shipMethodType = null;
		switch (index) {
		case 1:
			shipMethodType = ExpressCompany.EMS;
			break;
		case 2:
			shipMethodType = ExpressCompany.SF_EXPRESS;
			break;
		case 3:
			shipMethodType = ExpressCompany.SF_EXPRESS_AIR;
			break;
		case 4:
			shipMethodType = ExpressCompany.STO_EXPRESS;
			break;
		case 5:
			shipMethodType = ExpressCompany.YTO_EXPRESS;
			break;
		case 6:
			shipMethodType = ExpressCompany.YUNDAEX_EXPRESS;
			break;
		case 7:
			shipMethodType = ExpressCompany.ZJS_EXPRESS;
			break;
		case 8:
			shipMethodType = ExpressCompany.CITY_EXPRESS;
			break;
		case 9:
			shipMethodType = ExpressCompany.OTHERS;
			break;
		default:
			shipMethodType = null;
			break;
		}
		return shipMethodType;
	}

	public String getName() {
		return this.eName;
	}

	public int value() {
		return this.index;
	}
}
